# reset.py

from __future__ import division

from ot_simulator import transform
from ot_simulator.component import component

class reset(component.component):
    '''This saves the input transform, and resets the component stack.

    The reset is done by outputing :py:data:`~.transform.Identity_transform`.

    ===============  ==========================
     Input setting   
    ===============  ==========================
    <none>
    ===============  ==========================

    ===============  ==========================
    Output setting
    ===============  ==========================
    transform        the input transform
    ===============  ==========================

    Note: the ``transform`` output setting can not be examined before
    :meth:`get_transform` is done.
    '''

    def get_transform(self, params, transform_in):
        self.set_param(params, 'transform', transform_in)
        return transform.Identity_transform


def test():
    import doctest
    import sys
    sys.exit(doctest.testmod()[0])

if __name__ == "__main__":
    test()
